﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Threading;
using System.Windows.Forms.VisualStyles;

namespace DX.Comm
{
    public partial class PluginGroup : UserControl
    {
        public PluginGroup()
        {
            InitializeComponent();

        }
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public string Title
        {
            get
            {
                if (this.IsHandleCreated && !InvokeRequired)
                {
                    string tmptitle = string.Empty;
                    this.Invoke(() => { tmptitle = label1.Text; });
                    return tmptitle;
                }
                return label1 == null ? string.Empty : label1.Text;
            }

            set
            {
                if (label1 == null) return;
                if (this.IsHandleCreated&& !InvokeRequired)
                {
                    string tmptitle = value;
                    this.Invoke(() => { label1.Text = tmptitle; });
                    return;
                }
                label1.Text = value;
            }
        }
        public event EventHandler ItemClick;
        private void OnItemClick(object sender, EventArgs e)
        {
            ItemClick?.Invoke(sender, e);

      
        }
    }


}